package com.sjyp.cms.commons.Handler;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.jfinal.handler.Handler;
/**
 * 修改可适应扩展为.html的请求
 * @author zzh
 */
public class UrlSuffixHandler extends Handler{
	public void handle(String target,HttpServletRequest request,HttpServletResponse response,boolean[] isHandled){
//	     if (target.indexOf(".shtml")>-1){
//	    	 target = target.replace(".shtml", "");
//	     }
	     //设置项目根路径
	     request.setAttribute("basePath", request.getContextPath());
	     this.next.handle(target,request,response,isHandled);
	}
}
